Music-Driven Spiky Chrome Sphere (Unity)

Luna Tian

Overview

This project combines Unity Shader Graph and an audio-reactive control pipeline to build a futuristic “spiky chrome sphere.” The sphere responds to music in two distinct ways:

The result is a reflective sculpture that feels alive, pulsing and twisting to the soundtrack.

Demo Video 1 — Music: Scorpion - City pop Type Beat
Demo Video 2 — Music: Trap Synthwave Beat

Details

Shader Graph — Triplanar noise displacement along normals creates procedural spikes, modulated by _SpikeAmp and _Pulse.
Working Space

Final Parameter Settings

ParameterValueDescription
SpikeAmpDynamicBase spike amplitude
NoiseScale5.58Controls density of spikes
FlowSpeed0.105Speed of procedural noise flow
Sharpness1.9Controls spike sharpness
Threshold0.156Activation threshold for spike mask
PulseDynamicHeartbeat intensity driven by low-frequency band


Shader Math (Vertex Displacement)

Idea: approximate 3D noise via triplanar projections, then displace vertices along their normals so spikes grow outward from the sphere. When _SpikeAmp = 0, the surface is perfectly smooth.

Inputs

Triplanar UVs & Noises

\[ \mathbf{uv}_{xy} = (x, y)\cdot \_NoiseScale + (t, t), \quad \mathbf{uv}_{yz} = (y, z)\cdot \_NoiseScale + (1.37t, 1.37t), \quad \mathbf{uv}_{zx} = (z, x)\cdot \_NoiseScale + (2.11t, 2.11t) \] Let \( n_{xy}=\text{Noise}(\mathbf{uv}_{xy}),\; n_{yz}=\text{Noise}(\mathbf{uv}_{yz}),\; n_{zx}=\text{Noise}(\mathbf{uv}_{zx}) \in [0,1]\).

Triplanar Weights

\[ \mathbf{a} = |\mathbf{n}| = (|n_x|, |n_y|, |n_z|),\quad s = a_x + a_y + a_z + \varepsilon,\;\; \varepsilon=10^{-5} \] \[ \mathbf{w} = \frac{\mathbf{a}}{s} = (w_x, w_y, w_z),\;\; w_x+w_y+w_z \approx 1 \]

Approximate 3D Noise

\[ \text{noise}_{01} = w_x \cdot n_{xy} + w_y \cdot n_{yz} + w_z \cdot n_{zx} \in [0,1] \]

Spike Mask & Amplitude

\[ \text{noise}_{\text{sharp}} = \left(\text{clamp}(\text{noise}_{01},\,0,1)\right)^{\_Sharpness} \] \[ \text{mask} = \text{smoothstep}(\_Threshold,\, 1,\, \text{noise}_{\text{sharp}}) \] \[ \text{amp} = \text{mask} \cdot \_SpikeAmp \cdot \left(1 + 0.2 \cdot \_Pulse\right) \]

Normal Displacement

\[ \mathbf{p}_{\text{out}} = \mathbf{p} + \mathbf{n} \cdot \text{amp} \] Feed \( \mathbf{p}_{\text{out}} \) into the Shader Graph’s Vertex Position.



Music Scripting Methodology

Signal flow for controlling _SpikeAmp (high/overall energy) and _Pulse (low-frequency heartbeat):

1. Spectrum Acquisition

2. Spike Path — High/Overall Energy → _SpikeAmp

3. Pulse Path — Low-Frequency Focus → _Pulse

4. Rotation Coupled to Pulse



Takeaways